<template>
  <div class="active-time">
    <div class="block-year">
      <span class="demonstration">按年：</span>
      <el-date-picker class="year" v-model="value3" type="year" placeholder="请选择年份">
      </el-date-picker>
    </div>
    <div class="block-month">
      <span class="demonstration">按月份：</span>
      <el-date-picker class="month" v-model="value2" type="month" placeholder="请选择月份">
      </el-date-picker>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value2: "",
      value3: "",
    };
  },
};
</script>

<style lang="less" scoped>
.active-time,
.block-year,
.block-month {
  display: flex;
  align-items: center;
}
.block-month {
  margin-left: 100px;
}
.year,
.month{
  width: 150px;
}
</style>